import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/login_entity.g.dart';
import 'dart:convert';
export 'package:wanxiang_app/generated/json/login_entity.g.dart';

@JsonSerializable()
class LoginEntity {
	late int code;
	late String msg;
	late LoginData data;

	LoginEntity();

	factory LoginEntity.fromJson(Map<String, dynamic> json) => $LoginEntityFromJson(json);

	Map<String, dynamic> toJson() => $LoginEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class LoginData {
	late int id;
	@JSONField(name: "site_id")
	late int siteId;
	@JSONField(name: "group_id")
	late int groupId;
	@JSONField(name: "user_name")
	 String userName='';
	late String salt;
	late String password;
	@JSONField(name: "withdraw_pw")
	dynamic withdrawPw;
	late String mobile;
	 String nickname='';
	late String telphone;
	late String qq;
	late String wechat;
	late double amount;
	@JSONField(name: "is_im")
	late int isIm;
	@JSONField(name: "reg_time")
	late String regTime;
	@JSONField(name: "reg_ip")
	late String regIp;
	@JSONField(name: "user_photo")
	late String userPhoto;
	@JSONField(name: "id_card")
	late String idCard;
	@JSONField(name: "real_name")
	late String realName;
	@JSONField(name: "personal_refresh")
	late int personalRefresh;
	@JSONField(name: "group_refresh")
	late int groupRefresh;
	@JSONField(name: "old_refresh")
	late int oldRefresh;
	@JSONField(name: "group_code")
	late int groupCode;
	@JSONField(name: "invitation_code")
	late String invitationCode;
	@JSONField(name: "invitation_use")
	late String invitationUse;
	@JSONField(name: "invitation_num")
	late int invitationNum;
	@JSONField(name: "user_id")
	late int userId;
	@JSONField(name: "real_time")
	 String realTime='';

	LoginData();

	factory LoginData.fromJson(Map<String, dynamic> json) => $LoginDataFromJson(json);

	Map<String, dynamic> toJson() => $LoginDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}